<?php

// Define path to application directory
defined('APPLICATION_PATH')
    || define('APPLICATION_PATH', realpath(dirname(__FILE__) . '/application'));

// Define application environment
defined('APPLICATION_ENV')
    || define('APPLICATION_ENV', (getenv('APPLICATION_ENV') ? getenv('APPLICATION_ENV') : 'production'));

// Ensure library/ is on include_path
//set_include_path(implode(PATH_SEPARATOR, array(
//    realpath(APPLICATION_PATH . '/../library'),
//    get_include_path(),
//)));
// Fix hostvn.net
set_include_path(
APPLICATION_PATH.'/../library'.PATH_SEPARATOR.
APPLICATION_PATH.'/../library/Zend'
);

// Define prefix for DB
define('DB_PREFIX', '');
// Define table of DB
define('USER_TABLE', DB_PREFIX.'users');
define('LOCATION_TABLE', DB_PREFIX.'locations');
define('CITY_TABLE', DB_PREFIX.'cities');
define('TOUR_TABLE', DB_PREFIX.'tours');
define('USER_TOUR_TABLE', DB_PREFIX.'user_tour');
define('TOUR_LOCATION_TABLE', DB_PREFIX.'tour_location');
define('PHOTO_TABLE', DB_PREFIX.'photos');
define('REPORT_TABLE', DB_PREFIX.'reports');
define('COMMENT_TABLE', DB_PREFIX.'comments');
define('LIKE_TABLE', DB_PREFIX.'likes');
define('TOUR_CHAT_TABLE', DB_PREFIX.'tour_chat');
define('FRIEND_TABLE', DB_PREFIX.'friends');
define('MESSAGE_TABLE', DB_PREFIX.'messages');
define('NOTIFICATION_TABLE', DB_PREFIX.'notifications');
define('USER_LOCATION_TABLE', DB_PREFIX.'user_location');

// Define upload folder
define('UPLOAD_PHOTO_DIRECTORY', '../zend/public/');
/*
 * Nếu đưa lên cùng với project API thì sửa thành như sau :
define('UPLOAD_PHOTO_DIRECTORY', '../api/public/');
* trong đó folder api để ngang hàng với folder ytour 
*/

/** Zend_Application */
require_once 'Zend/Application.php';

// Create application, bootstrap, and run
$application = new Zend_Application(
    APPLICATION_ENV,
    APPLICATION_PATH . '/configs/application.ini'
);
$application->bootstrap()->run();